import json from "@rollup/plugin-json";
import {
  terser
} from 'rollup-plugin-terser'

// esm
export default {
  input: "./index.js",
  output: [{
      file: "dist/bundle.esm.js",
      format: "esm",
      // 代码压缩
      plugins: [terser()]
    },
    {
      file: "dist/bundle.cjs.js",
      format: "cjs"
    }
  ],
  plugins: [json()],
}